package com.ruoyi.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.demo.domain.newMeet;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;

@Mapper
public interface NewMeetMapper extends BaseMapper<newMeet> {
    @Insert("INSERT INTO meet (theme, meet_content, start_time, end_time, num_respondents, actual_num, status, created_at, update_at, rating, user_id, room_id) " +
            "VALUES (#{theme}, #{meetContent}, #{startTime}, #{endTime}, #{numRespondents}, #{actualNum}, #{status}, #{createdAt}, #{updateAt}, #{rating}, #{userId}, #{roomId})")
    @Options(useGeneratedKeys = true, keyProperty = "meetId", keyColumn = "meet_id")
    int insert(newMeet meet);
//    @Insert("INSERT INTO meet_requests (user_id, meet_id, room_id, status, start_time, end_time, created_at,update_at) " +
//            "VALUES (#{userId}, #{meetId}, #{roomId}, 0, #{startTime}, #{endTime}, #{createdAt}, #{updateAt})")
//    Boolean add_requests_item(newMeet meet);
}
